home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / pgpocx / pgpocx.txt < prev   
Text File  |  1997-05-15  |  3KB  |  93 lines

  1. PGPocx.ocx
  2.  
  3. This is an ActiveX control written in VB5 that acts as an interface
  4. to PGP (Pretty Good Privacy) version 2.62 or later.  This control
  5. contains NO STRONG ENCRYPTION ALGORITHMS.  You must have a copy of 
  6. PGP set up properly to use this control.
  7.  
  8. This control is only useful for encryption and decryption of string
  9. data. This release does not include key management routines or other
  10. encryption options.  You are, of course, not obligated to send $$,
  11. but if you like the control and would like to see more features, send
  12. comments and suggestions to:
  13.  
  14. karl@cstone.net
  15.  
  16. and send the cash ($5 is fair, for my time and effort) to:
  17.  
  18. Karl Houseknecht
  19. 28 Evergreen Lane
  20. Palmyra, VA  22963
  21.  
  22. Feel free to email me at karl@cstone.net with any questions about
  23. the control.  I will support it in a limited fashion, but I am NOT
  24. RESPONSIBLE for anything it might do to your system.
  25.  
  26. Properties
  27. ----------
  28. OutFile - temporary output file.  Must be different than TempFile.
  29. Pass - pass phrase for secret key
  30. Path - path to pgp directory (e.g. c:\pgp)
  31. TempFile - temporary input file.  Must be differeny than OutFile.
  32. UserID - user id for a public key
  33. Text - the text to encrypt
  34.  
  35. Methods
  36. -------
  37. Encrypt - encrypts plaintext and outputs ciphertext in radix-64
  38. Decrypt - decrypts ciphertext in radix-64 and outputs plaintext
  39. Sign - Signs with private key and leaves message readable
  40. GetUserIDs - parses pubkey.pgp and returns userid's in array.
  41.              Only works for userid's of format "user@domain".
  42.              Supports up to 100 userid's.  You'll get an error
  43.              for any above this amount.
  44.  
  45. Events
  46. ------
  47. Progress - fires every so often.  No value passed to this event,
  48.            just include code to show progress (e.g. add a * to 
  49.            a label.caption each time it fires)
  50.  
  51. How to Use
  52. ----------
  53.  
  54. Set these properties ALWAYS:
  55.  
  56. pgp1.OutFile = "c:\outfile.txt"      'use any filename 
  57. pgp1.TempFile = "c:\tempfile.txt"    'use any filename
  58. pgp1.Path = "c:\pgp"                 'your pgppath here
  59.  
  60. 'All properties can be set at design time or run time
  61.  
  62. Public Sub EncryptThis()
  63.     pgp1.Text = Text1.Text
  64.     pgp1.UserId = "user@host"
  65.     Text1.Text = pgp1.Encrypt
  66. End Sub
  67.  
  68. Public Sub SignThis()
  69.     PGP1.Pass = "pass phrase"
  70.         PGP1.UserId = "user@host"
  71.         PGP1.Text = Text1.Text
  72.         Text1.Text = PGP1.Sign
  73. End sub
  74.  
  75. Public Sub DecryptThis()
  76.     PGP1.Text = Text1.Text
  77.         PGP1.Pass = "pass phrase"
  78.         Text1.Text = PGP1.Decrypt
  79. End Sub
  80.  
  81. Public Sub ListThePubring()
  82.     users = PGP1.GetUserIDs
  83.     For i = 1 To UBound(users)
  84.         If users(i) = "" Then
  85.             Exit For
  86.         Else
  87.             lstAvailKeys.AddItem users(i)
  88.         End If
  89.     Next i
  90.     users = Empty
  91. End Sub
  92.  
  93.